package com.hanma.service.impl;

import com.hanma.bean.Record;
import com.hanma.dao.RecordDao;
import com.hanma.dao.impl.RecordDaoImpl;
import com.hanma.service.RecordService;

import java.util.Collections;
import java.util.List;

public class RecordServiceImpl implements RecordService {
    @Override
    public boolean insert(Record record) {
        RecordDao dao = new RecordDaoImpl();
        int num = dao.insert(record);
        return num > 0;
    }

    @Override
    public boolean delete(Integer id) {
        return false;
    }

    @Override
    public Record find(Integer id) {
        return null;
    }

    @Override
    public List<Record> findAll(Integer id) {
        RecordDao dao = new RecordDaoImpl();
        return dao.findAll(id);
    }

    @Override
    public List<Record> findAll(Integer id, Integer start, Integer size) {
        RecordDao dao = new RecordDaoImpl();
        return dao.findAll(id, start, size);
    }
}
